﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillDailyProductList.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Basics.Shop.Reconciliations.BillDailyProductList" %>

<%@ Import Namespace ="ZLCMS.Business.Util" %>
<%@ Import Namespace="ZLCMS.Commands.User.Util" %>
<%=_framePage.GetPagerFormHtml(Request.RawUrl)%>
<%=_framePage.TabInfoHtml()%>
<style type="text/css">
       .shoplist p{ line-height: 18px;word-break: break-all; word-wrap: break-word;}
</style>
<form id="pageForm" method="post" class="pageForm" runat="Server">
<input type="hidden" name="bno" cond="bno" value="<%=Request["bno"] %>"/>
<div class="pageHeader">
	<div class="searchBar">
		<table class="searchContent">
        <tr>	
        <td>
			    <span>起止时间&nbsp;</span>
				<asp:TextBox ID="start" runat="server" class="date" format="yyyy-MM-dd" readonly="true" cond="start"></asp:TextBox>-
			    <asp:TextBox ID="end" class="date" format="yyyy-MM-dd" readonly="true" runat="server" cond="end"></asp:TextBox>
			</td>
              <% if (AuthUtil.CheckAuthorization("BILL_MAN", "VIEW_ALL", uAcc))
           { %>
        <td>
			<span>商家&nbsp;</span>
            </td><td>
			<asp:dropdownlist runat="server" ID="DeptCode" cond="deptcode"></asp:dropdownlist>
		</td>
         <td>
			<span>类型&nbsp;</span>
            </td><td>
			<asp:dropdownlist runat="server" ID="ddl_BillKind" cond="billkind">
                <asp:ListItem value="-1">--请选择--</asp:ListItem>
                <asp:ListItem  value="SALE">销售</asp:ListItem>
                <asp:ListItem  value="REFUND">退款</asp:ListItem>
                <asp:ListItem  value="CANCEL">取消</asp:ListItem>
            </asp:dropdownlist>
		</td>
        <%} %>
		</tr>
		</table>
		
	    <div class="subBar">
			<ul>

			<li>
			    <a class="buttonActive" href="<%= Request.Path %>" onclick="ZLAN_DWZ_EX.query(this);" 
			    target="navTab" rel="<%= _framePage.NavTabId %>" title="<%= _framePage.NavTabTitle %>"><span>查询</span></a>
			</li>
           <%-- <li>
			    <a class="button" href="<%= Request.Path %>" onclick="ZLAN_DWZ_EX.exportFile(this);" 
			    target="dwzExport" rel="exportexcel" title="导出EXCEL"><span>导出EXCEL</span></a>
			</li>--%>

			</ul>
	    </div>
	</div>
</div>

<div class="pageContent">   
   	<div class="panelBar">
		<ul class="toolBar">
        </ul>
	</div>
	<div class="tableList" layoutH="118">
	<table class="list shoplist" targetType="navTab" asc="asc" desc="desc">
	    <thead>
			<tr>
			    <th width="10%">日期</th>
                <th width="25%">商品名称</th>
                <th width="10%">SKU</th>
                <th width="5%">操作类型</th>
                <th width="6%">数量</th>
                <th width="6%">金额</th>
				<th width="6%">核算金额</th>
				<th width="10%">备注</th>
                <th width="10%">操作</th>
			</tr>
		</thead>
		<tbody>
            <asp:repeater runat="server" id="grid">
                <ItemTemplate>
			    <tr target="uid">
               
				    <td ><%#Convert.ToDateTime(((IDictionary)Container.DataItem)["OptDate"]).ToShortDateString()%></td>
                    <td>
                        <%#  ((IDictionary)Container.DataItem)["ProductName"]%>
                    </td>
                    <td>
                        <%#  ((IDictionary)Container.DataItem)["ProductSkuName"]%>
                    </td>
                    <td>
                     <%#  (string)((IDictionary)Container.DataItem)["BillKind"] == "SALE" ? "销售" : ((string)((IDictionary)Container.DataItem)["BillKind"] == "REFUND" ? "退款" : "取消")%>
                    </td>

                    <td>
                       <%#  ((IDictionary)Container.DataItem)["TotalQuantity"]%>

                    </td>
				    <td><%#  ((IDictionary)Container.DataItem)["TotalFee"]%></td>
                    <td> <%#  ((IDictionary)Container.DataItem)["FinalTotalFee"]%></td>
				      <td> <%#  ((IDictionary)Container.DataItem)["Memo"]%></td>
                       <td>
                        <a href="/SystemManage/Basics/Shop/Reconciliations/BillDailyProductDetail.aspx?start=<%#((IDictionary)Container.DataItem)["OptDate"]%>&end=<%#  ((IDictionary)Container.DataItem)["OptDate"]%>&sku=<%#  ((IDictionary)Container.DataItem)["ProductSkuNo"]%>&k=<%# ((IDictionary)Container.DataItem)["BillKind"]%>&freshtabid=<%= _framePage.NavTabId %>"  target="navTab" rel="BillProductDetail" title="帐单-产品日明细">产品日明细</a>&nbsp;&nbsp;
                    </td>
			    </tr>
                </ItemTemplate>
            </asp:repeater>
		</tbody>
	</table>
</div>
	
     <%= _framePage.GetPagerContentHtml()%>
</div>
</form>